package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.ChannelGroupUserAddDTO;
import org.jsola.hr.dto.ChannelGroupUserUpdateDTO;
import org.jsola.hr.query.ChannelGroupQuery;
import org.jsola.hr.query.ChannelGroupUserQuery;
import org.jsola.hr.vo.ChannelGroupUserListVO;
import org.jsola.hr.vo.ChannelGroupUserVO;

import java.util.List;

/**
 * 渠道分组用户中间表
 *
 * @author zhr
 */
@Api(tags = "hr-渠道分组用户中间表")
public interface IChannelGroupUserControllerAPI {

    /**
     * 删除分组的管理员
     * @param channelGroupUserQuery 渠道分组表查询参数
     * @return 1
     */
    @ApiOperation(value="删除分组的管理员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupUserQuery", dataType = "ChannelGroupUserQuery", value = "渠道分组表查询参数", paramType = "query")
    })
    Result<Integer> deleteGroupManager(ChannelGroupUserQuery channelGroupUserQuery);

    /**
     * 批量新增渠道分组用户中间表
     * @param channelGroupUserAddDTO 渠道分组用户中间表新增实体
     * @return 1
     */
    @ApiOperation(value = "批量新增渠道分组用户中间表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupUserAddDTO", dataType = "ChannelGroupUserAddDTO", value = "新增渠道分组用户中间表", paramType = "body")
    })
    Result<Integer> batchSave(ChannelGroupUserAddDTO channelGroupUserAddDTO);

    /**
     * 通过分组id查询所有的管理员
     * @param channelGroupUserQuery 渠道分组用户中间表查询参数
     * @return LIST
     */
    @ApiOperation(value="通过分组id查询所有的管理员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupUserQuery", dataType = "ChannelGroupUserQuery", value = "渠道分组用户中间表查询参数", paramType = "query")
    })
    Result<List<ChannelGroupUserListVO>> getUserByGroupId(ChannelGroupUserQuery channelGroupUserQuery);

    /**
     * 新增渠道分组用户中间表
     * @param channelGroupUserAddDTO 渠道分组用户中间表新增实体
     * @return 渠道分组用户中间表展示对象
     */
    @ApiOperation(value = "新增渠道分组用户中间表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupUserAddDTO", dataType = "ChannelGroupUserAddDTO", value = "新增渠道分组用户中间表", paramType = "body")
    })
    Result<ChannelGroupUserVO> save(ChannelGroupUserAddDTO channelGroupUserAddDTO);


    /**
     * 修改渠道分组用户中间表
     * @param channelGroupUserUpdateDTO 渠道分组用户中间表
     * @return 更新数量
     */
    @ApiOperation(value = "修改渠道分组用户中间表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupUserUpdateDTO", dataType = "ChannelGroupUserUpdateDTO", value = "修改渠道分组用户中间表", paramType = "body")
    })
    Result<Integer> update(ChannelGroupUserUpdateDTO channelGroupUserUpdateDTO);




    /**
     * 删除单个渠道分组用户中间表，彻底删除
     * @param channelGroupUserId 渠道分组用户中间表id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个渠道分组用户中间表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupUserId", dataType = "String", value = "渠道分组用户中间表id", paramType = "path")
    })
    Result<Integer> delete(String channelGroupUserId);


    /**
     * 批量删除渠道分组用户中间表，彻底删除
     * @param channelGroupUserIds 渠道分组用户中间表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除渠道分组用户中间表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupUserIds", dataType = "String[]", value = "渠道分组用户中间表id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] channelGroupUserIds);


    /**
     * 根据渠道分组用户中间表id查询渠道分组用户中间表详情
     * @param channelGroupUserId 渠道分组用户中间表id
     * @return 渠道分组用户中间表详情
     */
    @ApiOperation(value="根据渠道分组用户中间表id查询渠道分组用户中间表详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupUserId", dataType = "String", value = "渠道分组用户中间表id", paramType = "path")
    })
    Result<ChannelGroupUserVO> findById(String channelGroupUserId);


    /**
     * 查询渠道分组用户中间表
     * @param channelGroupUserQuery 渠道分组用户中间表查询参数
     * @return page
     */
    @ApiOperation(value="查询渠道分组用户中间表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupUserQuery", dataType = "ChannelGroupUserQuery", value = "渠道分组用户中间表查询参数", paramType = "query")
    })
    Result<List<ChannelGroupUserListVO>> listAll(ChannelGroupUserQuery channelGroupUserQuery);


     /**
     * 分页查询渠道分组用户中间表
     * @param channelGroupUserQuery 渠道分组用户中间表查询参数
     * @return page
     */
    @ApiOperation(value="分页查询渠道分组用户中间表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupUserQuery", dataType = "ChannelGroupUserQuery", value = "渠道分组用户中间表查询参数", paramType = "query")
    })
    Result<Page<ChannelGroupUserListVO>> page(ChannelGroupUserQuery channelGroupUserQuery);


}

